﻿namespace HutongGames.PlayMakerEditor
{
    using System;
    using UnityEditor;
    using UnityEngine;

    public class AboutPlaymaker : EditorWindow
    {
        private void OnEnable()
        {
            base.title = "About";
            base.minSize = new Vector2(264f, 295f);
            base.maxSize = new Vector2(264f, 296f);
        }

        private void OnGUI()
        {
            if (!FsmEditorStyles.IsInitialized())
            {
                FsmEditorStyles.Init();
            }
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            FsmEditorGUILayout.PlaymakerHeader(this);
            GUILayout.Label("\x00a9 Hutong Games LLC. All Rights Reserved.", EditorStyles.miniLabel, new GUILayoutOption[0]);
            GUILayout.Label("Version " + FsmEditorUtility.GetPlayMakerVersionString(), new GUILayoutOption[0]);
            GUI.enabled = false;
            GUILayout.Box("Special Thanks:\nErin Ko, Kemal Amarasingham, Bruce Blumberg, Steve Gargolinski, Lee Hepler, Bart Simon, Lucas Meijer, Joachim Ante, Jaydee Alley, James Murchison, XiaoHang Zheng, Andrzej Łukasik, Vanessa Wesley, Marek Ledvina, Bob Berkebile, Jean Fabre, MaDDoX, and the PlayMaker community!\n", FsmEditorStyles.InfoBox, new GUILayoutOption[] { GUILayout.MinHeight(145f) });
            GUI.enabled = true;
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Release Notes", new GUILayoutOption[0]))
            {
                EditorCommands.OpenWikiPage(WikiPages.ReleaseNotes);
            }
            if (GUILayout.Button("Hutong Games", new GUILayoutOption[0]))
            {
                Application.OpenURL("http://hutonggames.com/");
            }
            GUILayout.Space(5f);
            GUILayout.EndVertical();
        }
    }
}

